extends ../layout

block content
  style
    include index.css
  h1= title
  table(border="1" cellspacing="0")
    thead
      tr
        each item in ['任务类型', '创建时间', '操作']
          th #{item}
    tbody
      each item in list
        tr
          each key in ['name', 'createtime']
            td #{item[key]}
          td
            a.btn.btn-primary(href="/tasktype/delete?typeId=" + item.id) 删除

  div
    a.btn.btn-primary(href="/tasktype/add") 添加任务类型
    a.btn.btn-primary(href="/home" style="margin-left: 10px;") 返回首页
  script
    include index.js